package com.bgs.service.impl;

import com.bgs.entity.Store;
import com.bgs.mapper.CommodityorderMapper;
import com.bgs.pojo.CommodityorderVo;
import com.bgs.service.CommodityorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommodityorderServiceImpl  implements CommodityorderService {
    @Autowired
    CommodityorderMapper commodityorderMapper;
    @Override
    public List<CommodityorderVo> load(Integer curNow, Integer userId) {
        List<CommodityorderVo> commodityorderVo = commodityorderMapper.load(curNow,userId);
        return commodityorderVo;
    }
    @Override
    public List<CommodityorderVo> load2(Integer coId) {
        List<CommodityorderVo> commodityorderVo = commodityorderMapper.load2(coId);
        return commodityorderVo;
    }

    @Override
    public void updatecotype(Integer coId) {
        commodityorderMapper.updatecotype(coId);

    }

    //取消订单
    @Override
    public void qxdd(Integer coId) {
        commodityorderMapper.qxdd(coId);
    }

    @Override
    public CommodityorderVo find(Integer coId) {
        CommodityorderVo commodityorderVo = commodityorderMapper.find(coId);
        return commodityorderVo;
    }


}